package com.star.wellconnect.signuplogin;

import android.os.Bundle;
import android.support.v4.view.ViewPager;

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.star.wellconnect.BaseActivity;
import com.star.wellconnect.R;

public class SignupLoginActivity extends BaseActivity {
	private ViewPager mViewPager;
	
	public SignupLoginActivity() {
		super(R.string.app_name);
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_signuplogin);
		
		mViewPager = (ViewPager) findViewById(R.id.pager);
		SLFragmentPagerAdapter adapter = new SLFragmentPagerAdapter(
				getSupportFragmentManager(), 
				getResources().getStringArray(R.array.login_signup),
				this);
		mViewPager.setAdapter(adapter);

		// Initialize
		mViewPager.setCurrentItem(0);
		getActionBar().hide();
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
	}
	
	public void switchPage(int position){
		if(mViewPager.getChildCount() > position){
			mViewPager.setCurrentItem(position);
		}
	}
}
